_base_ = [
    '../_base_/custom_imports.py',
    '../_base_/datasets/resize_chest.py',
    '../_base_/schedules/imagenet_dense.py',
    '../_base_/default_runtime.py',
]


# Modify these variables as needed
lr = 6e-4
n = 1
vpl = 1
dataset = 'chest'
nshot = 1
exp_num = 1

run_name = f'resize_imt-{vpl}_bs4_lr{lr}_{nshot}-shot_{dataset}'

# Model configuration
model = dict(
    type='ImageClassifier',
    backbone=dict(type='ResizeIMT'),
    head=dict(
        type='MultiLabelLinearClsHead',
        num_classes=19,
        in_channels=768,
    ))

# Data configuration
data = dict(
    samples_per_gpu=10,
    train=dict(ann_file=f'data/MedFMC/{dataset}/{dataset}_{nshot}-shot_train_exp{exp_num}.txt'),
    val=dict(ann_file=f'data/MedFMC/{dataset}/test.txt'),
    test=dict(ann_file=f'data/MedFMC/{dataset}/test_WithLabel.txt'))

# Optimizer configuration
optimizer = dict(lr=lr)

# Logging configuration
log_config = dict(
    interval=10,
    hooks=[
        dict(type='TextLoggerHook'),
    ])

# Checkpoint path
load_from = 'work_dirs/vit-base-p16_3rdparty_pt-64xb64_in1k-224_20210928-02284250.pth'

# Output directory
work_dir = f'work_dirs/resize_imt/{run_name}/exp{exp_num}'

# Runner configuration
runner = dict(type='EpochBasedRunner', max_epochs=20)

# yapf:disable
log_config = dict(
    interval=10,
    hooks=[
        dict(type='TextLoggerHook'),
    ])